<template>
  <div class="add">
    <div class="listMain flex flex-d">
      <div class="lineDiv flex ai-c">
        <div class="lableDiv">模板名称：</div>
        <Input clearable placeholder="请输入模版名称" style="width: 300px" />
        <div class="lableDiv" style="margin-left:50px;">审核状态：</div>
        <Input clearable placeholder="请输入模版名称" style="width: 300px" />
      </div>
      <div class="lineDiv flex ai-c">
        <div class="lableDiv">模板级别：</div>
        <Select v-model="tGrade" style="width:300px;text-align:left;" disabled>
          <Option value="1">子模板</Option>
          <Option value="2">父模板</Option>
        </Select>
      </div>
      <!-- 父模板 -->
      <div class="lineDiv flex ai-c" v-if="tGrade==2">
        <div class="lableDiv">子模板选择：</div>
        <Select v-model="tChild" style="width:300px;text-align:left;">
          <Option value="1">第一个子模板</Option>
        </Select>
        <Button type="primary" style="width: 150px;margin-left: 20px;">添加至此父模板</Button>
      </div>
      <div class="lineDiv flex jc-sb" v-if="tGrade==2">
        <div class="lableDiv">子模板列表：</div>
        <div class="width-100">
          <Table stripe :columns="columnsChild" :data="dataChild"></Table>
        </div>
      </div>
      <!-- 子模板 -->
      <div class="lineDiv flex jc-sb" v-if="tGrade==1">
        <div class="lableDiv">字段设置：</div>
        <div class="width-100">
          <Table stripe :columns="columnsChild" :data="dataChild"></Table>
        </div>
      </div>
      <div class="lineDiv flex ai-c" v-if="tGrade==1">
        <div class="lableDiv">模板品类：</div>
        <Select v-model="tPl" style="width:300px;text-align:left;">
          <Option value="1">冰品</Option>
        </Select>
        <div class="lableDiv" style="margin-left:50px;">需求来源：</div>
        <Select v-model="tXq" style="width:300px;text-align:left;">
          <Option value="1">客户需求</Option>
        </Select>
      </div>
      <div class="lineDiv flex ai-c" v-if="tGrade==1">
        <div class="lableDiv">模板平台：</div>
        <Select v-model="tPt" style="width:300px;text-align:left;">
          <Option value="1">京东</Option>
        </Select>
      </div>
      <div class="lineDiv flex ai-c" v-if="tGrade==1">
        <div class="lableDiv">推荐等级：</div>
        <Select v-model="tDj" style="width:300px;text-align:left;">
          <Option value="1">10</Option>
        </Select>
      </div>
      <div class="lineDiv flex ai-c">
        <div class="lableDiv">等级限制：</div>
        <Select v-model="tDjxz" style="width:300px;text-align:left;">
          <Option value="1">1</Option>
        </Select>
        <div class="lableDiv" style="margin-left:50px;">段位限制：</div>
        <Select v-model="tDwxz" style="width:300px;text-align:left;">
          <Option value="1">初出茅庐</Option>
        </Select>
      </div>
      <div class="commitBtn flex jc-c">
        <Button type="primary" style="margin-right:20px;">驳回</Button>
        <Button type="primary">通过审核</Button>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    data () {
      return {
        tGrade:'1',
        tChild:'1',
        tPl:'1',
        tXq:'1',
        tPt:'1',
        tDj:'1',
        tDjxz:'1',
        tDwxz:'1',
        columnsChild:[
          {
            title: '字段名称',
            align: 'center',
            key: 'name'
          },
          {
            title: '填写方式',
            align: 'center',
            key: 'txfs'
          },
          {
            title: '是否必填',
            align: 'center',
            key: 'sfbt'
          },
          {
            title: '逻辑关系',
            align: 'center',
            key: 'ljgx'
          },
          {
            title: '备注',
            align: 'center',
            key: 'bz'
          },
        ],
        dataChild:[
          {
            name:"aa"
          }
        ],
      }
    },
    mounted(){
      
    },
    methods: {
      
    }
  }
</script>

<style lang="scss" scoped>
  .add{
    background-color: #F5F5F5;
    padding: 30px;
    .listMain{
      width: 100%;
      height: calc(100vh - 120px);
      box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2);
      background-color: #fff;
      padding: 20px;
      overflow-y: scroll;
      position: relative;
      .lineDiv{
        padding-bottom: 20px;
        .lableDiv{
          font-size: 14px;
          font-family: 'SourceHanSansCN-Medium, SourceHanSansCN';
          font-weight: 500;
          color: #333333;
          width: 85px;
          text-align: right;
          flex: 0 0 85px;
        }
        .addField{
          cursor: pointer;
          .addIcon{
            width: 14px;
            height: 14px;
            border: 1px solid #5272E2;
            line-height: 14px;
            text-align: center;
          }
          .addTitle{
            font-size: 14px;
            font-family: 'SourceHanSansCN-Regular, SourceHanSansCN';
            font-weight: 400;
            color: #5272E2;
            margin-left: 5px;
            padding-top: 2px;
          }
        }
      }
      .commitBtn{
        padding:30px 0
      }
    }
  }
  //弹框样式start
  .headerStyle{
    font-size: 18px;
    font-family: 'SourceHanSansCN-Medium, SourceHanSansCN';
    font-weight: 500;
    color: #333333;
    text-align: center;
  }
  /deep/ .ivu-modal-header{
    border-bottom: none !important;
    padding: 30px 0 10px;
  }
  /deep/ .ivu-modal-body{
    padding: 16px 35px !important;
  }
  /deep/ .ivu-modal-footer{
    border-top: none !important;
    padding: 30px 0;
  }
  .modulMain{
    .lineModul{
      padding-bottom: 20px;
      .labalModul{
        font-size: 14px;
        font-family: 'SourceHanSansCN-Medium, SourceHanSansCN';
        font-weight: 500;
        color: #333333;
        width: 100px;
        text-align: right;
        flex: 0 0 100px;
      }
    }
  }
  //弹框样式end
</style>
